package com.soft.bams.server;

import javax.swing.*;
import java.awt.*;

/**
 * @author wangzhisen
 * @Desc TODO
 * @date 2025/5/19
 */
public class ATMServer extends JFrame {

    ServerPanel serverPanel;
    RankPanel rankPanel;

    public ATMServer(){
        //设置服务端窗体的基本信息
        this.setTitle("ATM 服务器");
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.setSize(500 , 550);
        this.setLocationRelativeTo(null);

        //卡片式布局
        Container container = this.getContentPane();
        container.setLayout(new CardLayout());
        serverPanel = new ServerPanel();
        rankPanel = new RankPanel();
        //第一个展示的页面 serverPanel
        container.add(serverPanel , "server");
        container.add(rankPanel , "rank");
    }

    public static void main(String[] args) {
        new ATMServer().setVisible(true);
    }

}